package com.example.aigc_education.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.aigc_education.domain.Exam;
import com.example.aigc_education.domain.dto.UpdateExamByAdminDTO;
import com.example.aigc_education.domain.po.SelectExamByCourseIdPO;

import java.util.List;

/**
 * @description 针对表【stu_exam】的数据库操作Service
 */
public interface ExamService extends IService<Exam> {
    List<Exam> selectExamByUserId(Long userId);

    List<Exam> selectExamByUserIdAndStatus(Long userId, Integer status);

    List<Exam> selectGrades(Long userId);

//    List<SelectExamByCourseIdPO> selectExamByCourseId(Long courseId);

    List<Exam> selectGradesByExamType(Long userId, Integer examType);

    List<SelectExamByCourseIdPO> selectExamByCourseIdAndUserId(Long courseId, Long userId);

    List<SelectExamByCourseIdPO> selectExamByClassId(Long classId);

    List<SelectExamByCourseIdPO> selectAllExam();

    void updateExamByExamId(UpdateExamByAdminDTO updateExamByAdminDTO, Long examId);

    void deleteExamByExamId(Long examId);

    void addExam(Exam exam);

    void updateScore(Long examId, Integer score);
}
